#include<stdio.h>
int main() {
    int num = 0;
    for ( int i =1 ;i<=100;i++ ){
         int num1= i;
        while(num1>0){
            if(num1%10 == 9){
                num++;
            }
            num1/=10;
        }
        
    }
    printf("%d\n",num);
    return 0;
}